#ifndef SENDERUI_H
#define SENDERUI_H

#include <QDialog>
#include <QTimer>

#include <common.h>

class SyncPublish;

namespace Ui {
class SenderUI;
}

class SenderUI : public QDialog
{
    Q_OBJECT
    
public:
    explicit SenderUI(QWidget *parent = 0);
    ~SenderUI();
    
private slots:
    void on_pbStart_clicked();
    void slotTimeOut();
    void on_pbStop_clicked();

private:
    Ui::SenderUI *ui;
    QTimer *m_timer;
    SyncPublish* m_publishCli;

    void updateTableDatas();
    void sendDatas();

    void init();

    publish::QOS getQOSFromString(QString);

public slots:
    void slotTelemetryFromF(const QString& topic, QByteArray);
    void slotMsgResponceFromF(QString responce);
    void slotCommandToF(QByteArray, QString*);

signals:
    void commandToF(QByteArray, QString*);
};

#endif // SENDERUI_H
